home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / Metafont / Inputs / ec / exruwest.mf < prev    next >
Text File  |  1997-03-16  |  44KB  |  993 lines

  1. % exruwest.mf
  2. %
  3. % (c) Copyright 1995, 1996, 1997 J"org Knappen
  4. % (c) Copyright 1990, 1992 Norbert Schwarz
  5. %
  6. % This file is part of ecfonts version 1.0
  7. %
  8. % Please read the files 00readme.txt, 00inst.txt, 00error.txt, and
  9. % copyrite.txt for further information
  10. %
  11. % You find some documentation in ecdoc.tex (needs LaTeX2e)
  12. %
  13. % Content:
  14. %
  15. %   uppercase accented letters ("western part")
  16. %
  17. %   oct"300" .. oct"337"
  18. %
  19. %
  20. %   oct"300"    A with gravis
  21. %   oct"301"    A with acute
  22. %   oct"302"    A with circumflex
  23. %   oct"303"    A with tilde
  24. %   oct"304"    A with umlaut
  25. %   oct"305"    A with ring
  26. %   oct"306"    AE
  27. %   oct"307"    C with cedilla
  28. %
  29. %   oct"310"    E with gravis
  30. %   oct"311"    E with acute
  31. %   oct"312"    E with circumflex
  32. %   oct"313"    E with umlauts
  33. %   oct"314"    I with gravis
  34. %   oct"315"    I with acute
  35. %   oct"316"    I with circumflex
  36. %   oct"317"    I with umlaut
  37. %
  38. %   oct"320"    edh (icelandic) or  D with stroke
  39. %   oct"321"    N with tilde
  40. %   oct"322"    O with gravis
  41. %   oct"323"    O with acute
  42. %   oct"324"    O with circumflex
  43. %   oct"325"    O with tilde
  44. %   oct"326"    O with umlaut
  45. %   oct"327"    OE
  46. %
  47. %   oct"330"    O with  /
  48. %   oct"331"    U with gravis
  49. %   oct"332"    U with acute
  50. %   oct"333"    U with circumflex
  51. %   oct"334"    U with umlaut
  52. %   oct"335"    Y with acute
  53. %   oct"336"    Thorn
  54. %   oct"337"    Sharp S (SS)
  55.  
  56. version_check(1,0);  % |version_check| was introduced in dc1.3
  57.  
  58. ecchar "The letter A with gravis";
  59. beginchar_twice(oct"300",13u#,cap_height#,0);
  60. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  61. numeric left_stem,right_stem,outer_jut,alpha;
  62. right_stem=cap_stem-stem_corr;
  63. left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
  64. outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
  65. x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=cap_height+apex_o+apex_oo;
  66. alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
  67. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  68. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  69. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  70. if y0<cap_height-cap_notch_cut: y0:=cap_height-cap_notch_cut;
  71.  fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  72.   --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  73.   ...{up}z0+.5left--cycle; % left and right diagonals
  74. else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  75.   --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
  76. penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
  77. penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
  78. if hefty: y5r else: y5 fi =5/12y0;
  79. y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
  80. if serifs: numeric inner_jut; pickup tiny.nib;
  81.  prime_points_inside(1,2); prime_points_inside(4,3);
  82.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  83.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  84.  dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark);  % left serif
  85.  dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi  % right serif
  86. hpos_corr=if not serifs: .75u else: .25u fi; put_gravis;
  87. repeat_once;
  88. penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
  89.  
  90. ecchar "The letter A with acute";
  91. beginchar_twice(oct"301",13u#,cap_height#+acc_height#,0);
  92. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  93. numeric left_stem,right_stem,outer_jut,alpha;
  94. right_stem=cap_stem-stem_corr;
  95. left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
  96. outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
  97. x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=cap_height+apex_o+apex_oo;
  98. alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
  99. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  100. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  101. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  102. if y0<cap_height-cap_notch_cut: y0:=cap_height-cap_notch_cut;
  103.  fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  104.   --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  105.   ...{up}z0+.5left--cycle; % left and right diagonals
  106. else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  107.   --diag_end(2l,1l,1,1,1r,0)--cycle; % left and right diagonals
  108. fi
  109. penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
  110. penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
  111. if hefty: y5r else: y5 fi =5/12y0;
  112. y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
  113. if serifs: numeric inner_jut; pickup tiny.nib;
  114.  prime_points_inside(1,2); prime_points_inside(4,3);
  115.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  116.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  117.  dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark); % left serif
  118.  dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut);      % right serif
  119. fi
  120. % the accent
  121. if not monospace: hpos_corr=-.75u; fi
  122. put_accent;
  123. penlabels(0,1,2,3,4,5,6);
  124. repeat_once;
  125. endchar;
  126.  
  127. ecchar "The letter A with circumflex";
  128. beginchar(oct"302",13u#,cap_height#+acc_height#,0);
  129. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  130. numeric left_stem,right_stem,outer_jut,alpha;
  131. right_stem=cap_stem-stem_corr;
  132. left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
  133. outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
  134. x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=cap_height+apex_o+apex_oo;
  135. alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
  136. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  137. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  138. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  139. if y0<cap_height-cap_notch_cut: y0:=cap_height-cap_notch_cut;
  140.  fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  141.   --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  142.   ...{up}z0+.5left--cycle; % left and right diagonals
  143. else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  144.   --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
  145. penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
  146. penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
  147. if hefty: y5r else: y5 fi =5/12y0;
  148. y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
  149. if serifs: numeric inner_jut; pickup tiny.nib;
  150.  prime_points_inside(1,2); prime_points_inside(4,3);
  151.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  152.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  153.  dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark);  % left serif
  154.  dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi  % right serif
  155. % the accent
  156. uppercase_hat(x2,0,12,13,14,15,16);
  157. penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
  158. endchar;
  159.  
  160. ecchar "The letter A with tilde";
  161. beginchar(oct"303",13u#,cap_height#+acc_height#,0);
  162. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  163. numeric left_stem,right_stem,outer_jut,alpha;
  164. right_stem=cap_stem-stem_corr;
  165. left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
  166. outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
  167. x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=cap_height+apex_o+apex_oo;
  168. alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
  169. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  170. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  171. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  172. if y0<cap_height-cap_notch_cut: y0:=cap_height-cap_notch_cut;
  173.  fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  174.   --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  175.   ...{up}z0+.5left--cycle; % left and right diagonals
  176. else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  177.   --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
  178. penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
  179. penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
  180. if hefty: y5r else: y5 fi =5/12y0;
  181. y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
  182. if serifs: numeric inner_jut; pickup tiny.nib;
  183.  prime_points_inside(1,2); prime_points_inside(4,3);
  184.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  185.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  186.  dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark);  % left serif
  187.  dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi  % right serif
  188. % the accent
  189. uppercase_tilde(0,0,12,13,14,15,16);
  190. penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
  191. endchar;
  192.  
  193. ecchar "The letter A with umlaut";
  194. beginchar(oct"304",13u#,cap_height#+acc_height#,0);
  195. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  196. numeric left_stem,right_stem,outer_jut,alpha;
  197. right_stem=cap_stem-stem_corr;
  198. left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
  199. outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
  200. x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=cap_height+apex_o+apex_oo;
  201. alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
  202. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  203. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  204. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  205. if y0<cap_height-cap_notch_cut: y0:=cap_height-cap_notch_cut;
  206.  fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  207.   --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  208.   ...{up}z0+.5left--cycle; % left and right diagonals
  209. else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  210.   --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
  211. penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
  212. penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
  213. if hefty: y5r else: y5 fi =5/12y0;
  214. y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
  215. if serifs: numeric inner_jut; pickup tiny.nib;
  216.  prime_points_inside(1,2); prime_points_inside(4,3);
  217.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  218.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  219.  dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark);  % left serif
  220.  dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi  % right serif
  221. % the accent
  222. uppercase_umlaut(0,0,7,8,9,10);
  223. penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
  224.  
  225. ecchar "The letter A with ring";
  226. beginchar(oct"305",13u#,cap_height#+.8acc_height#,0);
  227. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  228. numeric left_stem,right_stem,outer_jut,alpha;
  229. right_stem=cap_stem-stem_corr;
  230. left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
  231. outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
  232. x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=cap_height+apex_o+apex_oo;
  233. alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
  234. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  235. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  236. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  237. if y0<cap_height-cap_notch_cut: y0:=cap_height-cap_notch_cut;
  238.  fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  239.   --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  240.   ...{up}z0+.5left--cycle; % left and right diagonals
  241. else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  242.   --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
  243. penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
  244. penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
  245. if hefty: y5r else: y5 fi =5/12y0;
  246. y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
  247. if serifs: numeric inner_jut; pickup tiny.nib;
  248.  prime_points_inside(1,2); prime_points_inside(4,3);
  249.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  250.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  251.  dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark);  % left serif
  252.  dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi  % right serif
  253. % the accent
  254. uppercase_circle(x2,y2,12,13,14,15);
  255. penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;
  256.  
  257. ecchar "The ligature AE";
  258. beginchar(oct"306",16u#,cap_height#,0);
  259. italcorr cap_height#*slant-beak_jut#-.5u#;
  260. adjust_fit(cap_serif_fit#,0);
  261. numeric left_stem,mid_stem,outer_jut,alpha;
  262. mid_stem=max(tiny.breadth,hround .9[mfudged.hair,mfudged.cap_stem]);
  263. pickup tiny.nib; pos1(mid_stem,0); pos2(mid_stem,0);
  264. lft x1l=lft x2l=hround(if monospace or hefty:.55 else:.5 fi\\w-.75u);
  265. top y1=h; bot y2=0;
  266. filldraw stroke z1e--z2e; % stem
  267. pickup crisp.nib; pos3(slab,90); pos4(mfudged.hair,0);
  268. top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
  269. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  270. pos5(cap_bar,-90); pos6(mfudged.hair,0); x5=x1;
  271. top y5l=vround(if hefty:.52 else:.48 fi\\[y2,y1]+.5cap_bar);
  272. pos0(cap_bar,90); pos7(mfudged.hair,0);
  273. z0=z5; x6=x7; y6-y5l=y0l-y7;
  274. if serifs and not(monospace and hefty): rt x6r=hround(w-3.65u+.5mfudged.hair);
  275.  y6=good.y(y5l+.6beak)+eps; rt x9r=hround(w-.5u);
  276. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  277. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  278. pos8(slab if not serifs:+2stem_corr fi,-90);
  279. pos9(mfudged.hair,0); bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
  280. arm(8,9,h,beak_darkness,1.5beak_jut);  % lower arm and beak
  281. left_stem=if monospace:fudged.hair else: cap_hair fi if hefty: -3stem_corr fi;
  282. outer_jut=.8cap_jut; x11l=l+letter_fit+outer_jut+.5u; y11=0;
  283. x12=x1l-apex_corr-if monospace:2 fi\\u; y12=h;
  284. alpha=diag_ratio(1,.5left_stem,y12-y11,x12-x11l);
  285. penpos11(alpha*left_stem,0); penpos12(alpha*left_stem,0);
  286. fill diag_end(12l,11l,1,1,11r,12r)
  287.  --diag_end(11r,12r,1,1,12l,11l)--cycle; % diagonal
  288. y10=h-slab; z10=whatever[z11,z12];
  289. fill z10--(x1,y10)--(x1,h)--z12--cycle;  % link
  290. penpos13(whatever,angle(z2-z1)); z13=whatever[z11,z12];
  291. penpos14(cap_band,90); x14=x0; y13l=y14l; y13r=y14r;
  292. if hefty: y14r=.4h; else: y14=y0; fi
  293. penstroke z13e--z14e; % bar line
  294. if serifs: numeric inner_jut; pickup tiny.nib;
  295.  prime_points_inside(11,12);
  296.  if rt x11'r+cap_jut+.5u+1<=lft x2l-.75cap_jut: inner_jut=cap_jut;
  297.  else: rt x11'r+inner_jut+.5u+1=lft x2l-.75inner_jut; fi
  298.  dish_serif(11',12,i,1/2,outer_jut,j,.6,inner_jut)(dark);  % lower left serif
  299.  nodish_serif(1,2,a,1/3,cap_jut+x1l-x12,b,1/3,.5cap_jut);  % upper serif
  300.  nodish_serif(2,1,c,1/3,.75inner_jut,d,1/3,.5cap_jut); fi  % lower middle serif
  301. penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar;
  302.  
  303. ecchar "The letter cedilla C";
  304. if serifs: beginchar(oct"307",13u#,cap_height#,0.875desc_depth#);
  305.  italcorr cap_height#*slant-.5u#;
  306.  adjust_fit(0,0);
  307.  pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90);
  308.  pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360);
  309.  rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1];
  310.  top y2r=h+o; bot y4r=-o; y3=.5[y2,y4];
  311.  bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps);
  312.  y5=max(good.y .95(h-y1),y4l+eps);
  313.  (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
  314.  (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
  315.  filldraw stroke z1e{x2-x1,10(y2-y1)}
  316.   ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc
  317.  pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o;
  318.  x1r-x1'=2cap_curve-fine; y1'=y1;
  319.  path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
  320.  numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
  321.  filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
  322. else: beginchar(oct"307",11.5u#,cap_height#,0.875desc_depth#);
  323.  italcorr cap_height#*slant-.5u#;
  324.  adjust_fit(0,0);
  325.  pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
  326.  pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
  327.  rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u;
  328.  lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u);
  329.  top y1r=vround .95h+o; top y2r=h+o; y3=.5h;
  330.  bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l;
  331.  filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  332.   & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals
  333. % the accent
  334. uppercase_cedilla(x4,0,7,8,9,10,11);
  335. math_fit(-.3cap_height#*slant-.5u#,.5ic#);
  336. penlabels(1,1',2,3,4,5,6,7,8,9,10,11); endchar;
  337.  
  338. ecchar "The letter E with gravis";
  339. beginchar_twice(oct"310", 12u#-width_adj#,cap_height#+acc_height#,0);
  340. italcorr cap_height#*slant-beak_jut#-.5u#;
  341. adjust_fit(cap_serif_fit#,0);
  342. hh:=vround(cap_height-stem_corr);
  343. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  344. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=hh; bot y2=0;
  345. filldraw stroke z1e--z2e; % stem
  346. pickup crisp.nib; pos3(slab,90); pos4(hair,0);
  347. top y3r=hh; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
  348. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  349. pos5(cap_bar,-90); pos6(hair,0);
  350. top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1;
  351. pos0(cap_bar,90); pos7(hair,0);
  352. z0=z5; x6=x7; y6-y5l=y0l-y7;
  353. if serifs: rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps;
  354.  rt x9r=hround(w-.5u);
  355. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  356. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  357. pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0);
  358. bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
  359. arm(8,9,hh,beak_darkness,1.5beak_jut);  % lower arm and beak
  360. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  361.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  362. math_fit(0,.5ic#);
  363. %if not serifs: hpos_corr=.75u; fi put_gravis;
  364. hpos_corr= .75u; put_gravis;
  365. repeat_once;
  366. penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
  367.  
  368. ecchar "The letter E with acute";
  369. beginchar_twice(oct"311", 12u#-width_adj#,cap_height#+acc_height#,0);
  370. italcorr cap_height#*slant-beak_jut#-.5u#;
  371. adjust_fit(cap_serif_fit#,0);
  372. hh:=vround(cap_height-stem_corr);
  373. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  374. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=hh; bot y2=0;
  375. filldraw stroke z1e--z2e; % stem
  376. pickup crisp.nib; pos3(slab,90); pos4(hair,0);
  377. top y3r=hh; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
  378. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  379. pos5(cap_bar,-90); pos6(hair,0);
  380. top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1;
  381. pos0(cap_bar,90); pos7(hair,0);
  382. z0=z5; x6=x7; y6-y5l=y0l-y7;
  383. if serifs: rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps;
  384.  rt x9r=hround(w-.5u);
  385. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  386. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  387. pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0);
  388. bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
  389. arm(8,9,hh,beak_darkness,1.5beak_jut);  % lower arm and beak
  390. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  391.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  392. put_accent;
  393. repeat_once;
  394. math_fit(0,.5ic#);
  395. penlabels(0,1,2,3,4,5,6,7,8,9);
  396. endchar;
  397.  
  398. ecchar "The letter E with circumflex";
  399. beginchar(oct"312", 12u#-width_adj#,cap_height#+acc_height#,0);
  400. italcorr cap_height#*slant-beak_jut#-.5u#;
  401. adjust_fit(cap_serif_fit#,0);
  402. hh:=vround(cap_height-stem_corr);
  403. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  404. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=hh; bot y2=0;
  405. filldraw stroke z1e--z2e; % stem
  406. pickup crisp.nib; pos3(slab,90); pos4(hair,0);
  407. top y3r=hh; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
  408. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  409. pos5(cap_bar,-90); pos6(hair,0);
  410. top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1;
  411. pos0(cap_bar,90); pos7(hair,0);
  412. z0=z5; x6=x7; y6-y5l=y0l-y7;
  413. if serifs: rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps;
  414.  rt x9r=hround(w-.5u);
  415. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  416. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  417. pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0);
  418. bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
  419. arm(8,9,hh,beak_darkness,1.5beak_jut);  % lower arm and beak
  420. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  421.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  422. math_fit(0,.5ic#);
  423. % the accent
  424. uppercase_hat(.5w,0,10,11,12,13,14);
  425. penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar;
  426.  
  427.  
  428. ecchar "The letter E with umlaut";
  429. beginchar(oct"313", 12u#-width_adj#,cap_height#+acc_height#,0);
  430. italcorr cap_height#*slant-beak_jut#-.5u#;
  431. adjust_fit(cap_serif_fit#,0);
  432. hh:=vround(cap_height-stem_corr);
  433. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  434. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=hh; bot y2=0;
  435. filldraw stroke z1e--z2e; % stem
  436. pickup crisp.nib; pos3(slab,90); pos4(hair,0);
  437. top y3r=hh; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
  438. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  439. pos5(cap_bar,-90); pos6(hair,0);
  440. top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1;
  441. pos0(cap_bar,90); pos7(hair,0);
  442. z0=z5; x6=x7; y6-y5l=y0l-y7;
  443. if serifs: rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps;
  444.  rt x9r=hround(w-.5u);
  445. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  446. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  447. pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0);
  448. bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
  449. arm(8,9,hh,beak_darkness,1.5beak_jut);  % lower arm and beak
  450. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  451.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  452. % the accent
  453. uppercase_umlaut(0,0,10,11,12,13);
  454. penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;
  455.  
  456.  
  457. ecchar "The letter I with gravis";
  458. beginchar_twice(oct"314",max(6u#,4u#+cap_stem#),cap_height#+acc_height#,0);
  459. italcorr cap_height#*slant-.25u#;
  460. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  461. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  462. lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=cap_height; bot y2=0;
  463. filldraw stroke z1e--z2e; % stem
  464. if serifs or monospace:
  465.  dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut);  % upper serif
  466.  dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut);  fi % lower serif
  467. if slitex:
  468.  pickup crisp.nib;       % arms based on proportions of uppercase E
  469.  pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90);
  470.  x3=x4=x1; top y3r=cap_height; bot y4r=0;
  471.  pos5(hair,0); pos6(hair,0); % top and bottom right arms
  472.  rt x5r=rt x6r=hround(w-u);
  473.  pos7(hair,180); pos8(hair,180); % top and bottom left arms
  474.  lft x7r=lft x8r=hround(u);
  475.  y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif!
  476.  y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy
  477.  arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms
  478.  arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right
  479. fi
  480. math_fit(0,.5ic#);
  481. hpos_corr=.5u; put_gravis;
  482. repeat_once;
  483. penlabels(1,2,3,4); endchar;
  484.  
  485. ecchar "The letter I with acute";
  486. beginchar_twice(oct"315",max(6u#,4u#+cap_stem#),cap_height#+acc_height#,0);
  487. italcorr cap_height#*slant-.25u#;
  488. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  489. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  490. lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=cap_height; bot y2=0;
  491. filldraw stroke z1e--z2e; % stem
  492. if serifs or monospace:
  493.  dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut);  % upper serif
  494.  dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut);  fi % lower serif
  495. if slitex:
  496.  pickup crisp.nib;       % arms based on proportions of uppercase E
  497.  pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90);
  498.  x3=x4=x1; top y3r=cap_height; bot y4r=0;
  499.  pos5(hair,0); pos6(hair,0); % top and bottom right arms
  500.  rt x5r=rt x6r=hround(w-u);
  501.  pos7(hair,180); pos8(hair,180); % top and bottom left arms
  502.  lft x7r=lft x8r=hround(u);
  503.  y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif!
  504.  y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy
  505.  arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms
  506.  arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right
  507. fi
  508. % the accent
  509. if not monospace: hpos_corr=-.5cap_jut; fi
  510. put_accent;
  511. repeat_once;
  512. math_fit(0,.5ic#); penlabels(1,2); endchar;
  513.  
  514. ecchar "The letter I with circumflex";
  515. beginchar(oct"316",max(6u#,4u#+cap_stem#),cap_height#+acc_height#,0);
  516. italcorr cap_height#*slant-.25u#;
  517. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  518. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  519. lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=cap_height; bot y2=0;
  520. filldraw stroke z1e--z2e; % stem
  521. if serifs or monospace:
  522.  dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut);  % upper serif
  523.  dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut);  fi % lower serif
  524. if slitex:
  525.  pickup crisp.nib;       % arms based on proportions of uppercase E
  526.  pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90);
  527.  x3=x4=x1; top y3r=cap_height; bot y4r=0;
  528.  pos5(hair,0); pos6(hair,0); % top and bottom right arms
  529.  rt x5r=rt x6r=hround(w-u);
  530.  pos7(hair,180); pos8(hair,180); % top and bottom left arms
  531.  lft x7r=lft x8r=hround(u);
  532.  y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif!
  533.  y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy
  534.  arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms
  535.  arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right
  536. fi
  537. math_fit(0,.5ic#);
  538. % the accent
  539. uppercase_hat(x1,0,15,16,17,18,19);
  540. penlabels(1,2,3,4,5,6,7,8,15,16,17,18,19); endchar;
  541.  
  542. ecchar "The letter I with umlaut";
  543. beginchar(oct"317",max(6u#,4u#+cap_stem#),cap_height#+acc_height#,0);
  544. italcorr cap_height#*slant-.25u#;
  545. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  546. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  547. lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=cap_height; bot y2=0;
  548. filldraw stroke z1e--z2e; % stem
  549. if serifs or monospace:
  550.  dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut);  % upper serif
  551.  dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut);  fi % lower serif
  552. if slitex:
  553.  pickup crisp.nib;       % arms based on proportions of uppercase E
  554.  pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90);
  555.  x3=x4=x1; top y3r=cap_height; bot y4r=0;
  556.  pos5(hair,0); pos6(hair,0); % top and bottom right arms
  557.  rt x5r=rt x6r=hround(w-u);
  558.  pos7(hair,180); pos8(hair,180); % top and bottom left arms
  559.  lft x7r=lft x8r=hround(u);
  560.  y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif!
  561.  y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy
  562.  arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms
  563.  arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right
  564. fi
  565. math_fit(0,.5ic#);
  566. % the accent
  567. uppercase_umlaut(0,0,15,16,17,18);
  568. penlabels(1,2,3,4,5,6,7,8,,15,16,17,18); endchar;
  569.  
  570. ecchar "The letter (Eth) bar D";
  571. beginchar(oct"320",13.5u#,cap_height#,0);
  572. italcorr .7cap_height#*slant-.5u#;
  573. adjust_fit(cap_serif_fit#,0);
  574. pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
  575. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0;
  576. filldraw stroke z1e--z2e; % stem
  577. penpos3(cap_band,90); penpos4(cap_band,90);
  578. penpos5(cap_curve-stem_corr,0);
  579. penpos6(cap_band,-90); penpos7(cap_band,-90);
  580. z3r=top z1; y4=y3; y5=.51[y4,y6]; y6=y7;
  581. z7r=bot z2; x4=x6=.5w+.25u; x5r=hround(w-u);
  582. x4l:=x6l:=x4-.25cap_curve;
  583. fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e;  % lobe
  584. if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
  585.  nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi  % lower serif
  586. % the bar
  587. pickup tiny.nib;
  588. y8=y9=y5;
  589. pos8(bar,90); pos9(bar,90);
  590. x9=x4;
  591. if serifs:  x8=x2l-cap_jut; else: x8=.5u; fi;
  592. filldraw stroke z8e--z9e;
  593. math_fit(0,ic#-.5u#); penlabels(1,2,3,4,5,6,7,8,9); endchar;
  594.  
  595. ecchar "The letter N with tilde";
  596. beginchar(oct"321",13u#+width_adj#,cap_height#+acc_height#,0);
  597. italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
  598. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  599. numeric thin_stem; thin_stem=hround(fudged.hair+stem_corr);
  600. pickup tiny.nib; pos1(thin_stem,0); pos2(thin_stem,0);
  601. pos3(thin_stem,0); pos4(thin_stem,0);
  602. pickup tiny.nib; top y1=top y3=cap_height; bot y2=bot y4=0;
  603. x1=x2; x3=x4; x1l=w-x3r;
  604. rt x3r=hround min(w-2u,w-3u+.5fudged.cap_stem);
  605. filldraw stroke z1e--z2e; % left stem
  606. filldraw stroke z3e--z4e; % right stem
  607. if hefty: penpos5(fudged.cap_stem,0); penpos6(fudged.cap_stem,0);
  608.  x5l=x1; x6r=x4; y5=cap_height; y6=0;
  609.  numeric upper_notch,lower_notch;
  610.  upper_notch=cap_height-cap_notch_cut; lower_notch=cap_notch_cut;
  611.  x1'=rt x1r; z1'=whatever[z5l,z6l]; x4'=lft x4l; z4'=whatever[z5r,z6r];
  612.  fill z5l..
  613.   if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi
  614.   {z6-z5}diag_in(5l,6l,1,6r)--z6r..
  615.   if y4'>lower_notch: {left}(x4'-1,lower_notch){up}... fi
  616.   {z5-z6}diag_in(6r,5r,1,5l)--cycle;  % diagonal
  617. else: penpos5(whatever,0); penpos6(whatever,90);
  618.  z5l=z1l; z6l=z4l;
  619.  z7=z6l+(max(eps,cap_stem-3stem_corr-tiny),0) rotated (angle(z5l-z6l)-90);
  620.  z5r=z7+whatever*(z5l-z6l); z6r=z7+whatever*(z5l-z6l);
  621.  filldraw stroke z5e..z6e; fi  % diagonal
  622. if serifs: if hefty: serif(1,2,a,1/3,-cap_jut); % upper left serif
  623.  else: serif(5,6,a,1/3,-cap_jut); fi  % upper left serif
  624.  dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif
  625.  dish_serif(3,4,e,1/2,cap_jut,f,1/2,cap_jut)(dark); fi  % upper right serif
  626. % the accent
  627. uppercase_tilde(0,0,8,9,10,11,12);
  628. math_fit(0,max(.5ic#-.5u#,0)); penlabels(1,1',2,3,4,4',5,6,7,8,9,10,11,12,13);
  629. endchar;
  630.  
  631. ecchar "The letter O with gravis";
  632. beginchar_twice(oct"322",14u#-width_adj#,cap_height#+acc_height#,0);
  633. italcorr .7cap_height#*slant-.5u#;
  634. adjust_fit(0,0);
  635. penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90);
  636. penpos2(cap_curve,180); penpos4(cap_curve,0);
  637. if monospace: x2r=hround 1.5u;
  638.  interim superness:=sqrt superness;  % make |"O"|, not |"0"|
  639. else: x2r=hround u; fi
  640. x4r=w-x2r; x1=x3=.5w; y1r=cap_height+o; y3r=-o;
  641. y2=y4=.5cap_height-vair_corr; y2l:=y4l:=.52cap_height;
  642. penstroke pulled_super_arc.e(1,2)(.5superpull)
  643.  & pulled_super_arc.e(2,3)(.5superpull)
  644.  & pulled_super_arc.e(3,4)(.5superpull)
  645.  & pulled_super_arc.e(4,1)(.5superpull) & cycle;  % bowl
  646. math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#);
  647. % the accent
  648. hpos_corr= .75u; put_gravis;
  649. repeat_once;
  650. penlabels(1,2,3,4); endchar;
  651.  
  652. ecchar "The letter O with acute"; % from pl_dl (plfonts)
  653. beginchar_twice(oct"323",14u#-width_adj#,cap_height#,0);
  654.  italcorr .7cap_height#*slant-.5u#;
  655.  adjust_fit(0,0);
  656.  penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90);
  657.  penpos2(cap_curve,180); penpos4(cap_curve,0);
  658.  if monospace: x2r=hround 1.5u;
  659.   interim superness:=sqrt superness; % make |"O"|, not |"0"|
  660.  else: x2r=hround u; fi
  661.  x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o;
  662.  y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
  663.  penstroke pulled_super_arc.e(1,2)(.5superpull)
  664.   & pulled_super_arc.e(2,3)(.5superpull)
  665.   & pulled_super_arc.e(3,4)(.5superpull)
  666.   & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl
  667.  penlabels(1,2,3,4);
  668.  hpos_corr=-.75u; put_accent;
  669. repeat_once;
  670. endchar; % accented O
  671.  
  672. ecchar "The letter O with circumflex";
  673. beginchar(oct"324",14u#-width_adj#,cap_height#+acc_height#,0);
  674. italcorr .7cap_height#*slant-.5u#;
  675. adjust_fit(0,0);
  676. penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90);
  677. penpos2(cap_curve,180); penpos4(cap_curve,0);
  678. if monospace: x2r=hround 1.5u;
  679.  interim superness:=sqrt superness;  % make |"O"|, not |"0"|
  680. else: x2r=hround u; fi
  681. x4r=w-x2r; x1=x3=.5w; y1r=cap_height+o; y3r=-o;
  682. y2=y4=.5cap_height-vair_corr; y2l:=y4l:=.52cap_height;
  683. penstroke pulled_super_arc.e(1,2)(.5superpull)
  684.  & pulled_super_arc.e(2,3)(.5superpull)
  685.  & pulled_super_arc.e(3,4)(.5superpull)
  686.  & pulled_super_arc.e(4,1)(.5superpull) & cycle;  % bowl
  687. math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#);
  688. % the accent
  689. uppercase_hat(x1,0,5,6,7,8,9);
  690. penlabels(1,2,3,4,5,6); endchar;
  691.  
  692. ecchar "The letter O with tilde";
  693. beginchar(oct"325",14u#-width_adj#,cap_height#+acc_height#,0);
  694. italcorr .7cap_height#*slant-.5u#;
  695. adjust_fit(0,0);
  696. penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90);
  697. penpos2(cap_curve,180); penpos4(cap_curve,0);
  698. if monospace: x2r=hround 1.5u;
  699.  interim superness:=sqrt superness;  % make |"O"|, not |"0"|
  700. else: x2r=hround u; fi
  701. x4r=w-x2r; x1=x3=.5w; y1r=cap_height+o; y3r=-o;
  702. y2=y4=.5cap_height-vair_corr; y2l:=y4l:=.52cap_height;
  703. penstroke pulled_super_arc.e(1,2)(.5superpull)
  704.  & pulled_super_arc.e(2,3)(.5superpull)
  705.  & pulled_super_arc.e(3,4)(.5superpull)
  706.  & pulled_super_arc.e(4,1)(.5superpull) & cycle;  % bowl
  707. math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#);
  708. % the accent
  709. uppercase_tilde(0,0,7,8,9,10,11);
  710. penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;
  711.  
  712. ecchar "The letter O with umlaut";
  713. beginchar(oct"326",14u#-width_adj#,cap_height#+acc_height#,0);
  714. italcorr .7cap_height#*slant-.5u#;
  715. adjust_fit(0,0);
  716. penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90);
  717. penpos2(cap_curve,180); penpos4(cap_curve,0);
  718. if monospace: x2r=hround 1.5u;
  719.  interim superness:=sqrt superness;  % make |"O"|, not |"0"|
  720. else: x2r=hround u; fi
  721. x4r=w-x2r; x1=x3=.5w; y1r=cap_height+o; y3r=-o;
  722. y2=y4=.5cap_height-vair_corr; y2l:=y4l:=.52cap_height;
  723. penstroke pulled_super_arc.e(1,2)(.5superpull)
  724.  & pulled_super_arc.e(2,3)(.5superpull)
  725.  & pulled_super_arc.e(3,4)(.5superpull)
  726.  & pulled_super_arc.e(4,1)(.5superpull) & cycle;  % bowl
  727. math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#);
  728. % the accent
  729. uppercase_umlaut(0,0,5,6,7,8);
  730. penlabels(1,2,3,4,5,6,7,8); endchar;
  731.  
  732.  
  733. ecchar "The ligature OE";
  734. beginchar(oct"327",18u#,cap_height#,0);
  735. italcorr cap_height#*slant-beak_jut#-.5u#;
  736. adjust_fit(cap_serif_fit#,0);
  737. numeric light_stem;
  738. light_stem=max(tiny.breadth,hround .8[mfudged.hair,mfudged.cap_stem]);
  739. pickup tiny.nib; pos1(light_stem,0); pos2(light_stem,0);
  740. lft x1l=lft x2l=hround .5w; top y1=h; bot y2=0;
  741. filldraw stroke z1e--z2e; % stem
  742. pickup crisp.nib; pos3(slab,90); pos4(mfudged.hair,0);
  743. top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
  744. arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
  745. pos5(cap_bar,-90); pos6(mfudged.hair,0);
  746. top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1;
  747. pos0(cap_bar,90); pos7(mfudged.hair,0);
  748. z0=z5; x6=x7; y6-y5l=y0l-y7;
  749. if serifs and not(monospace and hefty): rt x6r=hround(w-3.4u+.5mfudged.hair);
  750.  y6=good.y(y5l+.6beak)+eps; rt x9r=hround(w-.5u);
  751. else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
  752. arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);  % middle arm and serif
  753. pos8(slab if not serifs:+2stem_corr fi,-90);
  754. pos9(mfudged.hair,0); bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
  755. arm(8,9,h,beak_darkness,1.5beak_jut);  % lower arm and beak
  756. penpos11(vair,90); penpos13(vair,-90);
  757. if monospace: penpos12(fudged.cap_stem,180);
  758.  interim superness:=sqrt superness;  % make |"O"|, not |"0"|
  759. else: penpos12(hround(cap_curve-stem_corr),180); fi
  760. x11=x13=.5w-2u; y11r=h+o; y13r=-o; y12=.5h-vair_corr; x12r=hround u;
  761. x14=x15=.5w; y14=2/3h; y15=1/3h; y12l:=.52h;
  762. penstroke super_arc.e(11,12) & super_arc.e(12,13);  % left half of bowl
  763. fill z13r{right}..{right}(x2,0)--(x1,h){left}..{left}z11r
  764.  --z11l{right}...{z14-z11l}(.82[x11l,x14],.82[y14,y11l])
  765.  ...z14---z15...{z13l-z15}(.82[x13l,x15],.82[y15,y13l])
  766.  ...{left}z13l--cycle;  % right half of bowl
  767. if serifs: serif(1,2,a,1/3,.5cap_jut);  % upper serif
  768.  serif(2,1,b,1/3,.5cap_jut); fi  % lower serif
  769. penlabels(0,1,2,3,4,5,6,7,8,9,11,12,13,14,15); endchar;
  770.  
  771.  
  772. ecchar "Scandinavian letter O/slash";
  773. beginchar(oct"330",14u#,cap_height#+.25desc_depth#,.25desc_depth#);
  774. italcorr .7cap_height#*slant-.5u#;
  775. adjust_fit(0,0);
  776. penpos1(vair,90); penpos3(vair,-90);
  777. penpos2(fudged.cap_stem,180); penpos4(fudged.cap_stem,0);
  778. if monospace: x2r=hround 1.5u;
  779.  interim superness:=sqrt superness;  % make |"O"| not |"0"|
  780. else: x2r=hround u; fi
  781. x4r=w-x2r; x1=x3=.5w;
  782. y1r=cap_height+o; y2=y4=.5cap_height-vair_corr; y3r=-o;
  783. penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
  784.  & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
  785. x5=x4-vair; x6=x2+vair; y5=h; y6=-d;
  786. numeric theta; theta=angle(z5-z6)-90;
  787. pickup crisp.nib; pos5(vair',theta); pos6(vair',theta);
  788. filldraw stroke z5e--z6e;  % diagonal
  789. penlabels(1,2,3,4,5,6); endchar;
  790.  
  791.  
  792. ecchar "The letter U with gravis";
  793. beginchar_twice(oct"331",13u#+.5width_adj#,cap_height#+acc_height#,0);
  794. italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
  795. if monospace: adjust_fit(cap_serif_fit#-.5u#,cap_serif_fit#-.5u#)
  796. else: adjust_fit(cap_serif_fit#,cap_serif_fit#) fi;
  797. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  798. pos2'(cap_stem,180); z2'=z2;
  799. pos3(cap_band,-90);
  800. pos4(cap_hair,0); pos5(cap_hair,0);
  801. x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r;
  802. top y1=top y5=cap_height; y2=y4=1/3cap_height; bot y3r=-o;
  803. lft x1l=hround max(2u,3u-.5cap_stem);
  804. filldraw stroke z1e--z2e; % left stem
  805. filldraw stroke pulled_arc.e(2',3)
  806.  & pulled_arc.e(3,4)&z4e--z5e; % arc and right stem
  807. if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % left serif
  808.  dish_serif(5,4,c,1/2,cap_jut,d,1/2,cap_jut)(dark); fi  % right serif
  809. math_fit(-cap_serif_fit#-.3cap_height#*slant-min(cap_height#*slant,u#),
  810.  max(.5ic#-.5u#,0));
  811. hpos_corr= .75u; put_gravis;
  812. repeat_once;
  813. penlabels(1,2,3,4,5,6,7); endchar;
  814.  
  815. ecchar "The letter U with acute";
  816. beginchar_twice(oct"332",13u#+.5width_adj#,cap_height#+acc_height#,0);
  817. italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
  818. if monospace: adjust_fit(cap_serif_fit#-.5u#,cap_serif_fit#-.5u#)
  819. else: adjust_fit(cap_serif_fit#,cap_serif_fit#) fi;
  820. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  821. pos2'(cap_stem,180); z2'=z2;
  822. pos3(cap_band,-90);
  823. pos4(cap_hair,0); pos5(cap_hair,0);
  824. x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r;
  825. top y1=top y5=cap_height; y2=y4=1/3cap_height; bot y3r=-o;
  826. lft x1l=hround max(2u,3u-.5cap_stem);
  827. filldraw stroke z1e--z2e; % left stem
  828. filldraw stroke pulled_arc.e(2',3)
  829.  & pulled_arc.e(3,4)&z4e--z5e; % arc and right stem
  830. if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % left serif
  831.  dish_serif(5,4,c,1/2,cap_jut,d,1/2,cap_jut)(dark); fi  % right serif
  832. % the accent
  833. put_accent;
  834. repeat_once;
  835. penlabels(1,2,3,4,5); endchar;
  836.  
  837. ecchar "The letter U with circumflex";
  838. beginchar(oct"333",13u#+.5width_adj#,cap_height#+acc_height#,0);
  839. italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
  840. if monospace: adjust_fit(cap_serif_fit#-.5u#,cap_serif_fit#-.5u#)
  841. else: adjust_fit(cap_serif_fit#,cap_serif_fit#) fi;
  842. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  843. pos2'(cap_stem,180); z2'=z2;
  844. pos3(cap_band,-90);
  845. pos4(cap_hair,0); pos5(cap_hair,0);
  846. x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r;
  847. top y1=top y5=cap_height; y2=y4=1/3cap_height; bot y3r=-o;
  848. lft x1l=hround max(2u,3u-.5cap_stem);
  849. filldraw stroke z1e--z2e; % left stem
  850. filldraw stroke pulled_arc.e(2',3)
  851.  & pulled_arc.e(3,4)&z4e--z5e; % arc and right stem
  852. if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % left serif
  853.  dish_serif(5,4,c,1/2,cap_jut,d,1/2,cap_jut)(dark); fi  % right serif
  854. math_fit(-cap_serif_fit#-.3cap_height#*slant-min(cap_height#*slant,u#),
  855.  max(.5ic#-.5u#,0));
  856. % the accent
  857. uppercase_hat(x3,0,6,7,8,9,10);
  858. penlabels(1,2,3,4,5,6,7,6,7,8,9,10); endchar;
  859.  
  860.  
  861. ecchar "The letter U with umlaut";
  862. beginchar(oct"334",13u#+.5width_adj#,cap_height#+acc_height#,0);
  863. italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
  864. if monospace: adjust_fit(cap_serif_fit#-.5u#,cap_serif_fit#-.5u#)
  865. else: adjust_fit(cap_serif_fit#,cap_serif_fit#) fi;
  866. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  867. pos2'(cap_stem,180); z2'=z2;
  868. pos3(cap_band,-90);
  869. pos4(cap_hair,0); pos5(cap_hair,0);
  870. x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r;
  871. top y1=top y5=cap_height; y2=y4=1/3cap_height; bot y3r=-o;
  872. lft x1l=hround max(2u,3u-.5cap_stem);
  873. filldraw stroke z1e--z2e; % left stem
  874. filldraw stroke pulled_arc.e(2',3)
  875.  & pulled_arc.e(3,4)&z4e--z5e; % arc and right stem
  876. if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % left serif
  877.  dish_serif(5,4,c,1/2,cap_jut,d,1/2,cap_jut)(dark); fi  % right serif
  878. math_fit(-cap_serif_fit#-.3cap_height#*slant-min(cap_height#*slant,u#),
  879.  max(.5ic#-.5u#,0));
  880. % the accent
  881. uppercase_umlaut(0,0,6,7,8,9);
  882. penlabels(1,2,3,4,5,6,7,8,9); endchar;
  883.  
  884.  
  885. ecchar "The letter Y with acute";
  886. beginchar_twice(oct"335",13u#,cap_height#+acc_height#,0);
  887. italcorr cap_height#*slant+.45u#;
  888. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  889. numeric left_stem,right_stem,outer_jut,dy,alpha;
  890. left_stem=cap_stem-stem_corr;
  891. right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem);
  892. outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.05u;
  893. x2l=x5l=hround(.5w-.5left_stem); x3r=x5r;
  894. y1=y4=cap_height; y2=y3=y5=.4cap_height;
  895. dy=y1-y2; alpha=((x2l-x1l)++dy)/dy;
  896. penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
  897. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  898. penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=0;
  899. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  900. if y0>y2+cap_notch_cut: y0:=y2+cap_notch_cut;
  901.   fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r
  902.     --diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  903.     ...{down}z0+.5left--cycle; % diagonals and stem
  904. else: fill z0--diag_end(0,4l,1,1,4r,3r)--z5r
  905.     --diag_end(5r,6r,1,1,6l,5l)--z5l
  906.     --diag_end(2l,1l,1,1,1r,0)--cycle; fi  % diagonals and stem
  907. if serifs: numeric inner_jut; pickup tiny.nib;
  908.  prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,5);
  909.  if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
  910.  else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
  911.  dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut);  % upper left serif
  912.  dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark);  % upper right serif
  913.  dish_serif(6',5,e,1/3,cap_jut,f,1/3,cap_jut); fi  % lower serif
  914. % the accent
  915. put_accent;
  916. repeat_once;
  917. math_fit(.5u#-cap_height#*slant,ic#-4u#);
  918. penlabels(0,1,2,3,4,5,6); endchar;
  919.  
  920.  
  921. ecchar "The letter Thorn";
  922. beginchar(oct"336",11u#,cap_height#,0);
  923. italcorr .75cap_height#*slant-.5u#;
  924. adjust_fit(cap_serif_fit#,0);
  925. numeric left_stem,right_curve,middle_weight;
  926. left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5;
  927. pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0);
  928. lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0;
  929. filldraw stroke z1e--z2e; % stem
  930. penpos3(cap_band,90); penpos4(cap_band,90);
  931. penpos6(middle_weight,-90); penpos7(middle_weight,-90);
  932. penpos8(cap_band,90); penpos9(cap_band,90);
  933. penpos5(right_curve-stem_corr,0); penpos10(right_curve,0);
  934. penpos11(cap_band,-90); penpos12(cap_band,-90);
  935. z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair;
  936. x12=x1;
  937. y12r=0.26h; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h+y12r;
  938. x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u;
  939. x5r=hround(w-1.5u); x10r=hround(w-u);
  940. if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-2.5u];
  941. else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u];
  942.  x4l:=x4l-.5u; x9l:=x9l-.5u; fi
  943. x6l:=x6l-.5u; x11l:=x11l-.5u;
  944. fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e;  % lower lobe
  945. if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut);  % upper serif
  946.  dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi  % lower serif
  947. math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;
  948.  
  949.  
  950. ecchar "The letter Sharp S (SS)";
  951. beginchar(oct"337",if monospace: 15u# else: 20u# fi ,cap_height#,0);
  952. italcorr cap_height#*slant-u#;
  953. normal_adjust_fit(0,0);
  954. w:=0.5w;
  955. numeric theta; theta=90-angle(50u,h); slope:=-h/50u;  % angle at middle
  956. numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi;
  957. numeric ess'; ess'=max(fine.breadth,cap_ess);
  958. pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90);
  959. pos0(ess',theta); pos7(s_slab,-90);
  960. x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o;
  961. y0=.52h; lft x3l=hround u; rt x6r=hround(w-u);
  962. x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine;
  963. ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
  964. ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
  965. filldraw stroke super_arc.e(2,3) & z3e{down}
  966.  ..z4e---z5e..z6e{down} & super_arc.e(6,7);  % main stroke
  967. if serifs: pos1(hair,180); pos8(hair,180);
  968.  rt x1l=hround(w-1.5u); lft x8r=hround u;
  969.  bot y1=vround 2/3h+1; top y8=vround 1/3h-1;
  970.  filldraw stroke z1e{x2-x1,10(y2-y1)}....{left}z2e;  % upper arc
  971.  filldraw stroke z7e{left}....{up}z8e;  % lower arc
  972.  path upper_arc, lower_arc;
  973.  upper_arc=z1{x2-x1,10(y2-y1)}....{left}z2;
  974.  lower_arc=z7{left}....{up}z8;
  975.  pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0);
  976.  x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r;
  977.  x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8;
  978.  numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1'));
  979.  filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle;  % upper barb
  980.  t:=xpart(lower_arc intersectiontimes(z9r--z8'));
  981.  filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle;  % lower barb
  982. else: pos1(1.2flare,-100); pos8(1.2flare,-100);
  983.  x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u;
  984.  top y1l=vround .93h+o; bot y8r=vround .1h-o;
  985.  filldraw stroke term.e(2,1,right,.9,4);  % upper arc and terminal
  986.  filldraw stroke term.e(7,8,left,1,4); fi  % lower arc and terminal
  987. math_fit(0,.5ic#);
  988. w:=2w;
  989. currentpicture:=currentpicture+(currentpicture shifted (0.5w,0));
  990. penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar;
  991.  
  992. endinput;
  993.